
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>IconFont</title>
    <link rel="stylesheet" href="demo.css">
    <script src="iconfont.js"></script>

    <style type="text/css">
        .icon {
          /* 通过设置 font-size 来改变图标大小 */
          width: 1em; height: 1em;
          /* 图标和文字相邻时，垂直对齐 */
          vertical-align: -0.15em;
          /* 通过设置 color 来改变 SVG 的颜色/fill */
          fill: currentColor;
          /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
             normalize.css 中也包含这行 */
          overflow: hidden;
        }

    </style>
</head>
<body>
    <div class="main markdown">
        <h1>IconFont 图标</h1>
        <ul class="icon_lists clear">
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-energy_green"></use>
                    </svg>
                    <div class="name">energy_green</div>
                    <div class="fontclass">#icon-energy_green</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-biyan"></use>
                    </svg>
                    <div class="name">biyan</div>
                    <div class="fontclass">#icon-biyan</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-bluetooth"></use>
                    </svg>
                    <div class="name">bluetooth</div>
                    <div class="fontclass">#icon-bluetooth</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-daomo"></use>
                    </svg>
                    <div class="name">daomo</div>
                    <div class="fontclass">#icon-daomo</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-icon_add"></use>
                    </svg>
                    <div class="name">icon_add</div>
                    <div class="fontclass">#icon-icon_add</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-icon_bitong"></use>
                    </svg>
                    <div class="name">icon_bitong</div>
                    <div class="fontclass">#icon-icon_bitong</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-icon_buy"></use>
                    </svg>
                    <div class="name">icon_buy</div>
                    <div class="fontclass">#icon-icon_buy</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-icon_homepage"></use>
                    </svg>
                    <div class="name">icon_homepage</div>
                    <div class="fontclass">#icon-icon_homepage</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-icon_lianjie"></use>
                    </svg>
                    <div class="name">icon_lianjie</div>
                    <div class="fontclass">#icon-icon_lianjie</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-icon_more"></use>
                    </svg>
                    <div class="name">icon_more</div>
                    <div class="fontclass">#icon-icon_more</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-icon_notice"></use>
                    </svg>
                    <div class="name">icon_notice</div>
                    <div class="fontclass">#icon-icon_notice</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-icon_news"></use>
                    </svg>
                    <div class="name">icon_news</div>
                    <div class="fontclass">#icon-icon_news</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-icon_star_yellow"></use>
                    </svg>
                    <div class="name">icon_star_yellow</div>
                    <div class="fontclass">#icon-icon_star_yellow</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-icon_star_blue"></use>
                    </svg>
                    <div class="name">icon_star_blue2</div>
                    <div class="fontclass">#icon-icon_star_blue</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-icon_star_green"></use>
                    </svg>
                    <div class="name">icon_star_green1</div>
                    <div class="fontclass">#icon-icon_star_green</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-icon_star_green1"></use>
                    </svg>
                    <div class="name">icon_star_green2</div>
                    <div class="fontclass">#icon-icon_star_green1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-icon_vip"></use>
                    </svg>
                    <div class="name">icon_vip</div>
                    <div class="fontclass">#icon-icon_vip</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-icon_star_green2"></use>
                    </svg>
                    <div class="name">icon_star_green3</div>
                    <div class="fontclass">#icon-icon_star_green2</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-icon_star_blue1"></use>
                    </svg>
                    <div class="name">icon_star_blue1</div>
                    <div class="fontclass">#icon-icon_star_blue1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-icon_yanzhi"></use>
                    </svg>
                    <div class="name">icon_yanzhi</div>
                    <div class="fontclass">#icon-icon_yanzhi</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-kangzhou"></use>
                    </svg>
                    <div class="name">kangzhou</div>
                    <div class="fontclass">#icon-kangzhou</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-loading"></use>
                    </svg>
                    <div class="name">loading</div>
                    <div class="fontclass">#icon-loading</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-menu_black"></use>
                    </svg>
                    <div class="name">menu_black</div>
                    <div class="fontclass">#icon-menu_black</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-loading_white"></use>
                    </svg>
                    <div class="name">loading_white</div>
                    <div class="fontclass">#icon-loading_white</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-notice"></use>
                    </svg>
                    <div class="name">notice</div>
                    <div class="fontclass">#icon-notice</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-menu_white"></use>
                    </svg>
                    <div class="name">menu_white</div>
                    <div class="fontclass">#icon-menu_white</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-jingxue"></use>
                    </svg>
                    <div class="name">jingxue</div>
                    <div class="fontclass">#icon-jingxue</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-qq"></use>
                    </svg>
                    <div class="name">qq</div>
                    <div class="fontclass">#icon-qq</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-qunban"></use>
                    </svg>
                    <div class="name">qunban</div>
                    <div class="fontclass">#icon-qunban</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-pengyouquan"></use>
                    </svg>
                    <div class="name">pengyouquan</div>
                    <div class="fontclass">#icon-pengyouquan</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-runfu"></use>
                    </svg>
                    <div class="name">runfu</div>
                    <div class="fontclass">#icon-runfu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-notice1"></use>
                    </svg>
                    <div class="name">notice</div>
                    <div class="fontclass">#icon-notice1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-people"></use>
                    </svg>
                    <div class="name">people</div>
                    <div class="fontclass">#icon-people</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-phone"></use>
                    </svg>
                    <div class="name">phone</div>
                    <div class="fontclass">#icon-phone</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-time_green"></use>
                    </svg>
                    <div class="name">time_green</div>
                    <div class="fontclass">#icon-time_green</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-time_blue"></use>
                    </svg>
                    <div class="name">time_blue</div>
                    <div class="fontclass">#icon-time_blue</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-time_blue1"></use>
                    </svg>
                    <div class="name">time_blue 2</div>
                    <div class="fontclass">#icon-time_blue1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-time"></use>
                    </svg>
                    <div class="name">time</div>
                    <div class="fontclass">#icon-time</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-tiaoqixue"></use>
                    </svg>
                    <div class="name">tiaoqixue</div>
                    <div class="fontclass">#icon-tiaoqixue</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-tongjingluo"></use>
                    </svg>
                    <div class="name">tongjingluo</div>
                    <div class="fontclass">#icon-tongjingluo</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weixin"></use>
                    </svg>
                    <div class="name">weixin</div>
                    <div class="fontclass">#icon-weixin</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-share_black"></use>
                    </svg>
                    <div class="name">share_black</div>
                    <div class="fontclass">#icon-share_black</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-runfu1"></use>
                    </svg>
                    <div class="name">runfu</div>
                    <div class="fontclass">#icon-runfu1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-satr"></use>
                    </svg>
                    <div class="name">satr</div>
                    <div class="fontclass">#icon-satr</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-share_white"></use>
                    </svg>
                    <div class="name">share_white</div>
                    <div class="fontclass">#icon-share_white</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-share_star"></use>
                    </svg>
                    <div class="name">share_star</div>
                    <div class="fontclass">#icon-share_star</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-strength"></use>
                    </svg>
                    <div class="name">strength</div>
                    <div class="fontclass">#icon-strength</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-strength_blue"></use>
                    </svg>
                    <div class="name">strength_blue</div>
                    <div class="fontclass">#icon-strength_blue</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-smallpeople"></use>
                    </svg>
                    <div class="name">smallpeople</div>
                    <div class="fontclass">#icon-smallpeople</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-strength_green"></use>
                    </svg>
                    <div class="name">strength_green</div>
                    <div class="fontclass">#icon-strength_green</div>
                </li>
            
        </ul>


        <h2 id="symbol-">symbol引用</h2>
        <hr>

        <p>这是一种全新的使用方式，应该说这才是未来的主流，也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
        这种用法其实是做了一个svg的集合，与另外两种相比具有如下特点：</p>
        <ul>
          <li>支持多色图标了，不再受单色限制。</li>
          <li>通过一些技巧，支持像字体那样，通过<code>font-size</code>,<code>color</code>来调整样式。</li>
          <li>兼容性较差，支持 ie9+,及现代浏览器。</li>
          <li>浏览器渲染svg的性能一般，还不如png。</li>
        </ul>
        <p>使用步骤如下：</p>
        <h3 id="-symbol-">第一步：引入项目下面生成的symbol代码：</h3>
        <pre><code class="lang-js hljs javascript"><span class="hljs-comment">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;</span></code></pre>
        <h3 id="-css-">第二步：加入通用css代码（引入一次就行）：</h3>
        <pre><code class="lang-js hljs javascript">&lt;style type=<span class="hljs-string">"text/css"</span>&gt;
.icon {
   width: <span class="hljs-number">1</span>em; height: <span class="hljs-number">1</span>em;
   vertical-align: <span class="hljs-number">-0.15</span>em;
   fill: currentColor;
   overflow: hidden;
}
&lt;<span class="hljs-regexp">/style&gt;</span></code></pre>
        <h3 id="-">第三步：挑选相应图标并获取类名，应用于页面：</h3>
        <pre><code class="lang-js hljs javascript">&lt;svg <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"icon"</span> aria-hidden=<span class="hljs-string">"true"</span>&gt;<span class="xml"><span class="hljs-tag">
  &lt;<span class="hljs-name">use</span> <span class="hljs-attr">xlink:href</span>=<span class="hljs-string">"#icon-xxx"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">use</span>&gt;</span>
</span>&lt;<span class="hljs-regexp">/svg&gt;
        </span></code></pre>
    </div>
</body>
</html>
